// 搜索选项配置
export const SEARCH_OPTIONS = [
    {
        label: '客户姓名',
        key: 'cusName',
        type: 'input',
        placeholder: '请输入客户姓名',
        value: null,
    },
    {
        label: '订单编号',
        key: 'orderNo',
        type: 'input',
        placeholder: '请输入订单编号',
        value: null,
    },
    {
        label: '订单类型',
        key: 'orderType',
        type: 'select',
        options: [
            { label: '买料', value: 'BUY' },
            { label: '卖料', value: 'SELL' }
        ],
        value: null,
    },
    {
        label: '订单状态',
        key: 'orderStatus',
        type: 'select',
        options: [
            { label: '已定价', value: 'PENDING' },
            { label: '已违约结算', value: 'CANCELLED' },
            { label: '已完成', value: 'COMPLETED' }
        ],
        value: null,
    },
    {
        label: '物料类型',
        key: 'materialType',
        type: 'input',
        placeholder: '请输入物料类型',
        value: null,
    },
    {
        label: '下单时间',
        key: 'orderTime',
        type: 'daterange',
        startKey: 'minOrderTime',
        endKey: 'maxOrderTime',
        value: [],
    },
    {
        label: '结算时间',
        key: 'settleTime',
        type: 'daterange',
        startKey: 'minSettleTime',
        endKey: 'maxSettleTime',
        value: [],
    }
]

// 表格列配置
export const columns = [
    {
        label: '序号',
        prop: 'index',
        align: 'center',
        width: 60,
    },
    {
        label: '订单编号',
        prop: 'orderNo',
        align: 'center',
        width: 166
    },
    {
        label: '订单类型',
        prop: 'orderType',
        align: 'center',
        width: 100
    },
    {
        label: '物料类型',
        prop: 'materialType',
        align: 'center',
        width: 80
    },
    {
        label: '订单信息',
        prop: 'orderPrice',
        align: 'center',
        width: 230
    },
    {
        label: '重量(g)',
        prop: 'weight',
        align: 'center',
        width: 100
    },
    {
        label: '客户姓名',
        prop: 'cusName',
        align: 'center',
        width: 100
    },
    {
        label: '管理费',
        prop: 'manageFee',
        align: 'center',
    },
    {
        label: '保证金',
        prop: 'retainerAmount',
        align: 'center',
    },
    /*{
        label: '止盈单价(元/g)',
        prop: 'stopProfitLimit',
        align: 'center',
    },
    {
        label: '止损单价(元/g)',
        prop: 'stopLossLimit',
        align: 'center',
    },*/
    {
        label: '订单状态',
        prop: 'orderStatus',
        align: 'center',
    },
    // {
    //     label: '下单时间',
    //     prop: 'orderTime',
    //     align: 'center',
    // },
    {
        label: '结算信息',
        prop: 'settleTime',
        align: 'center',
        width: 230
    }
]

// 订单状态映射
export const ORDER_STATUS_MAP = {
    'PENDING': { label: '已定价', type: 'info' },
    'COMPLETED': { label: '交付结算', type: 'success' },
    'CANCELLED': { label: '已违约结算', type: 'danger' }
}

// 订单类型映射
export const ORDER_TYPE_MAP = {
    'BUY': { label: '买料', type: 'success' },
    'SELL': { label: '卖料', type: 'danger' }
}
// 物料类型
export const MATERIAL_TYPE_MAP = {
    'GOLD': { label: '黄金', type: 'success' },
    'SILVER': { label: '白银', type: 'success' },
    'PLATINUM': { label: '铂金', type: 'success' },
    'PALLADIUM': { label: '钯金', type: 'success' }
}
